const router = require('koa-router')();

router.get('/list', async (ctx) => {
    const data = [{title: 'news title', content: 'news content ...'}];
    await ctx.render('web/news/list', {
        list: data
    });
});

router.get('/detail', async (ctx) => {
    const data = {title: 'news title', content: 'news content ...'};
    await ctx.render('web/news/detail', {
        item: data
    });
});

module.exports = router.routes();